<?php


function int_to_string(&$data,$map=array('status'=>array(0=>'创建申请',1=>'正在采购',2=>'已采购',3=>'提交财务',4=>'财务确认完成，采购完成'))) {
    if($data === false || $data === null ){
        return $data;
    }
    $data = (array)$data;
    foreach ($data as $key => $row){
        foreach ($map as $col=>$pair){
            if(isset($row[$col]) && isset($pair[$row[$col]])){
                $data[$key][$col.'_toString'] = $pair[$row[$col]];
            }
        }
    }
    return $data;
}